From c8529148809c6e57cb36d478fe7a6a836d7415fc Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Tue, 14 Jul 2009 19:55:20 +0200 Subject: [PATCH] Generate ChangeLog from git log Add rule to generate ChangeLog from git log, copied from pango and Behdad Esfahbod. Also disable the rss generation in docs since the rss tool can't handle the git log format. --- ChangeLog => ChangeLog.pre-0-1 | 10 ---------- Makefile.am | 23 +++++++++++++++++++++++ docs/Makefile.am | 10 +--------- 3 files changed, 24 insertions(+), 19 deletions(-) rename ChangeLog => ChangeLog.pre-0-1 (99%) diff --git a/ChangeLog b/ChangeLog.pre-0-1 similarity index 99% rename from ChangeLog rename to ChangeLog.pre-0-1 index bff820a..14711c1 100644 --- a/ChangeLog +++ b/ChangeLog.pre-0-1 @@ -1,14 +1,4 @@ - - - - NOTE: After the migration to git this ChangeLog is no longer used - during development. Instead, it will be updated prior to every - release based on the git log. - - - - =========================== 0.1.0 released ============================= 2009-05-20 Martin Nordholts diff --git a/Makefile.am b/Makefile.am index 7a39f34..8e95d7a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,7 @@ built_dist_files = README EXTRA_DIST = \ $(built_dist_files) \ + ChangeLog.pre-0-1 \ AUTHORS \ COPYING \ INSTALL \ @@ -48,3 +49,25 @@ distclean-local: rm -f $(BUILT_EXTRA_DIST); \ fi + + +### ChangeLog generation + +CHANGELOG_START = BABL_0_1_0 + +ChangeLog: $(srcdir)/ChangeLog +$(srcdir)/ChangeLog: + @echo Creating $@ + @if test -d "$(srcdir)/.git"; then \ + (GIT_DIR=$(top_srcdir)/.git ./missing --run \ + git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > $@.tmp \ + && mv -f $@.tmp $@ \ + || ($(RM) $@.tmp; \ + echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ + (test -f $@ || echo git-log is required to generate this file >> $@)); \ + else \ + test -f $@ || \ + (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ + echo A git checkout and git-log is required to generate this file >> $@); \ + fi +.PHONY: $(srcdir)/ChangeLog diff --git a/docs/Makefile.am b/docs/Makefile.am index 6c26d32..48905f1 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -29,7 +29,7 @@ BUILT_EXTRA_DIST = index.html BablFishPath.html BablFishPath.txt CLEANFILES = README changelog.rss DISTCLEANFILES = index-static.html $(BUILT_EXTRA_DIST) -all: $(HTML_FILES) rss +all: $(HTML_FILES) BablFishPath.html: $(babl_fish_path_dhtml) @@ -71,14 +71,6 @@ distclean-local: rm -f $(BUILT_EXTRA_DIST); \ fi -rss: changelog.rss - -changelog.rss: ../ChangeLog - echo -n " RSS:" - echo -n " $@" - tools/changelog2rss $< > $@ && \ - echo " [OK]" || echo " Fail" - web: all graphics echo -n " WEB: " ping -c 1 $(WEBSITE_HOST) >/dev/null && \ -- 2.30.2